<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>安装</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="ds.requirements.html">« 需求</a></li>
      <li style="float: right;"><a href="ds.constants.html">预定义常量 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ds.setup.html">安装/配置</a></li>
    <li>安装</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="ds.installation" class="section">
  <h2 class="title">安装</h2>
  <p class="para">
     The easiest way to install the extension is via <a href="https://pecl.php.net/package/ds" class="link external">&raquo;&nbsp;PECL</a>
   <div class="example-contents screen">
<div class="cdata"><pre>
pecl install ds
</pre></div>
   </div>
</p>

   <p class="para">
     You can also build directly from source:

    <div class="example-contents screen">
<div class="cdata"><pre>
# Dependencies you might need to install
# sudo apt-get install git build-essential php7.0-dev

git clone https://github.com/php-ds/extension &quot;php-ds&quot;
cd php-ds

# Build and install the extension
phpize
./configure
make
make install

# Clean up the build files
make clean
phpize --clean
</pre></div>
   </div>

  </p>

  <p class="para">

   If you&#039;re on Windows, you can
   <a href="https://pecl.php.net/package/ds" class="link external">&raquo;&nbsp;download a compiled .dll on PECL</a>

  </p>

  <blockquote class="note"><p><strong class="note">注意</strong>: 
    <p class="para">
        If you&#039;re using Composer, it&#039;s highly recommended that you include
        <a href="https://packagist.org/packages/php-ds/php-ds" class="link external">&raquo;&nbsp;php-ds/php-ds</a>
        in your project so that your code is still functional in an environment where the
        extension is not installed. The extension will take priority if installed.
    </p>
  </p></blockquote>
 </div></div></div></body></html>